package com.spic.business.train.trainRecord.controller;

import com.spic.business.common.core.utils.poi.BusinessExcelUtil;
import com.spic.business.train.plan.domain.TrainPlan;
import com.spic.business.train.plan.service.ITrainPlanService;
import com.spic.business.train.trainInfo.domain.TrainInfo;
import com.spic.business.train.trainRecord.service.ITrainRecordService;
import com.spic.common.core.utils.poi.ExcelUtil;
import com.spic.common.log.annotation.Log;
import com.spic.common.log.enums.BusinessType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

@RestController
@RequestMapping("/train/trainRecord")
public class TrainRecordController {
    @Autowired
    private ITrainRecordService trainRecordService;

    @Log(title = "一期一档", businessType = BusinessType.EXPORT)
    @GetMapping("/export/{id}")
    public void export(HttpServletResponse response, @PathVariable("id") String id) throws IOException {
        trainRecordService.export(response,id);
    }
}
